package com.code.bean;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * todo
 *
 * @author wangjie
 * @version V1.0
 * @date 2020/1/6
 */
@Component
public class Pig {

    public Pig(){
        System.out.println("Pig constructor");
    }

    @PostConstruct
    public void init(){
        System.out.println("Pig PostConstruct");
    }

    @PreDestroy
    public void detory(){
        System.out.println("Pig PreDestroy");
    }
}
